<?php
/* @var $this EmployeeController */
/* @var $model Employee */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'employee-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'emp_firstname'); ?>
		<?php echo $form->textField($model,'emp_firstname',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'emp_firstname'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'emp_lastname'); ?>
		<?php echo $form->textField($model,'emp_lastname',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'emp_lastname'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'emp_middlename'); ?>
		<?php echo $form->textField($model,'emp_middlename',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'emp_middlename'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'emp_contact'); ?>
		<?php echo $form->textField($model,'emp_contact',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'emp_contact'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'emp_address'); ?>
		<?php echo $form->textField($model,'emp_address',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'emp_address'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'pharmacy_id'); ?>
		<?php echo $form->dropDownList ($model, 'pharmacy_id', CHtml::listData(
                Pharmacy::model()->findAll(), 'id','pharmacy_name'),
                        array('prompt' => 'Select a pharmacy')
                        ); ?>
                <?php echo $form->error($model,'pharmacy_id'); ?>
        </div>
       

	<div class="row">
		<?php echo $form->labelEx($model,'emp_type'); ?>
<div class="row">
                <?php echo $form->dropDownList($model, 'emp_type',$htmlOptions=array
                (
                'Pharmacist' =>'Pharmacist',
				'Admin' =>'Admin',
                
                ),array('prompt' => 'Select an employee type')) ?>
                <?php echo $form->error($model,'emp_type'); ?>
        </div>

	<div class="row">
		<?php echo $form->labelEx($model,'emp_username'); ?>
		<?php echo $form->textField($model,'emp_username',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'emp_username'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'emp_password'); ?>
		<?php echo $form->passwordField($model,'emp_password',array('size'=>45,'maxlength'=>45, 'beforeSave')); ?>
		<?php echo $form->error($model,'emp_password'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->